 /* Copyright (C)
  * 2024 ZKLX Optoelectronic Technology Co.LTD
  * All rights reserved.
  */
 /**
  * @file jcvp.h
  * @brief JCVP header
  * @author xuke
  * @version 1.0
  * @date 2024-10-14
  */

#ifndef _JCVP_H_
#define _JCVP_H_


/*------------------Include Files----------------------------*/
#include <atomic>
/*------------------End of Include Files---------------------*/

/*------------------Macro Definition-------------------------*/
/*------------------End of Macro Definition------------------*/


/*------------------Typedefs Definition----------------------*/
class JCVP_T {
	public:
		JCVP_T(std::string web_root, int port, int vp_fps, float img_scale);
		JCVP_T();
		~JCVP_T();
		int webs_run();
		//int frame_update(cv::Mat frame);
		void vp_show();
		void jc_send(std::string data_str);
		std::string jc_recv();

		std::string get_web_root();
		float get_img_scaling();
		int get_vp_fps();
		int get_port();

	public:
		void *_conn = NULL;
		std::string _jc_str;
		std::atomic_int16_t _is_new_jc_str = 0;

	private:
		std::string _web_root = "./www"; //web前端根目录
		float _img_scaling = 2.0;        //尺寸缩放比例
		int _vp_fps = 50;                //帧率
		int _port = 18080;               //server端口

		//cv::Mat _new_frame;
};
/*------------------End of Typedefs Definition---------------*/


/*------------------API Definition---------------------------*/
/*------------------End of API Definition--------------------*/


#endif /* End of _JCVP_H_ */

